//
//  Tool.h
//  cascade-realm
//
//  Created by QSC on 16/5/24.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface Tool : NSObject
/**
 *左右渐变
 *
 *colors 渐变的颜色 @[(__bridge id)[UIColor redColor].CGColor, (__bridge id)[UIColor yellowColor].CGColor, (__bridge id)[UIColor blueColor].CGColor];
 *locations 渐变颜色的分割点 @[@0.3, @0.5, @1.0];
 *startPoint&endPoint 颜色渐变的方向，范围在(0,0)与(1.0,1.0)之间，如(0,0)(1.0,0)代表水平方向渐变,(0,0)(0,1.0)代表竖直方向渐变
 */
+ (void)colorGradientLayerForView:(UIView *)view frame:(CGRect)frame colors:(NSArray *)colors locations:(NSArray *)locations;

/**
 *左上右下渐变
 *
 *colors 渐变的颜色 @[(__bridge id)[UIColor redColor].CGColor, (__bridge id)[UIColor yellowColor].CGColor, (__bridge id)[UIColor blueColor].CGColor];
 *locations 渐变颜色的分割点 @[@0.3, @0.5, @1.0];
 *startPoint&endPoint 颜色渐变的方向，范围在(0,0)与(1.0,1.0)之间，如(0,0)(1.0,0)代表水平方向渐变,(0,0)(0,1.0)代表竖直方向渐变
 */
+ (void)colorGradientForView:(UIView *)view frame:(CGRect)frame colors:(NSArray *)colors locations:(NSArray *)locations;


/**
 * 颜色渐变
 * 生成 UIImage
 */
+ (UIImage *)getBGImage:(UIColor *)startColor and:(UIColor *)endColor directionType:(NSInteger)directionType option:(CGSize)size;



+ (void)ShowLoading;
+ (void)HideLoading;


+ (void)moreClick:(NSString *)userId;


+ (NSString *)randomStringWithNumber:(NSInteger)number;

+ (UIImage *)getImage:(NSString *)image;

+ (void)Follow:(NSString *)userId;

@end

NS_ASSUME_NONNULL_END
